package org.minproject.my_library_back.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName information
 */
@TableName(value ="information")
@Data
public class Information implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer informationId;

    /**
     * 
     */
    private Integer userId;

    /**
     * 
     */
    private String informationContent;

    /**
     * 
     */
    private String informationSort;

    /**
     * 
     */
    private Date informationTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Information other = (Information) that;
        return (this.getInformationId() == null ? other.getInformationId() == null : this.getInformationId().equals(other.getInformationId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getInformationContent() == null ? other.getInformationContent() == null : this.getInformationContent().equals(other.getInformationContent()))
            && (this.getInformationSort() == null ? other.getInformationSort() == null : this.getInformationSort().equals(other.getInformationSort()))
            && (this.getInformationTime() == null ? other.getInformationTime() == null : this.getInformationTime().equals(other.getInformationTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getInformationId() == null) ? 0 : getInformationId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getInformationContent() == null) ? 0 : getInformationContent().hashCode());
        result = prime * result + ((getInformationSort() == null) ? 0 : getInformationSort().hashCode());
        result = prime * result + ((getInformationTime() == null) ? 0 : getInformationTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", informationId=").append(informationId);
        sb.append(", userId=").append(userId);
        sb.append(", informationContent=").append(informationContent);
        sb.append(", informationSort=").append(informationSort);
        sb.append(", informationTime=").append(informationTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}